<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="${request.contextPath}/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
    <link href="${request.contextPath}/plug/layui/css/layui.css" rel="stylesheet">
    <link href="${request.contextPath}/css/layui-admin.css" rel="stylesheet">
    <link href="${request.contextPath}/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
    <link href="${request.contextPath}/css/animate.min.css" rel="stylesheet">
    <link href="${request.contextPath}/css/style.min.css?v=3.0.0" rel="stylesheet">
    <script src="${request.contextPath}/js/jquery.min.js"></script>
    <script src="${request.contextPath}/js/bootstrap.min.js"></script>
    <script src="${request.contextPath}/plug/layui/layui.all.js"></script>
    <script src="${request.contextPath}/js/layuiList.js"></script>
    <title></title>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">

    <style>
    .backlog-body{
        padding: 10px 15px;
        background-color: #f8f8f8;
        color: #999;
        border-radius: 2px;
        transition: all .3s;
        -webkit-transition: all .3s;
        overflow: hidden;
        max-height: 84px;
    }
    .backlog-body h3{
        margin-bottom: 10px;
    }
    .right-icon{
        position: absolute;
        right: 10px;
    }
    .backlog-body p cite {
        font-style: normal;
        font-size: 17px;
        font-weight: 300;
        color: #009688;
    }
    .layuiadmin-badge, .layuiadmin-btn-group, .layuiadmin-span-color {
        position: absolute;
        right: 15px;
    }
    .layuiadmin-badge {
        top: 50%;
        margin-top: -9px;
        color: #01AAED;
    }
</style>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12 layui-col-sm12 layui-col-lg12">
                <div class="layui-card">
                    <div class="layui-card-header">会员详情</div>
                    <div class="layui-card-body">
                        <ul class="layui-row layui-col-space10 layui-this">
                            <li class="layui-col-xs4">
                                <div class="backlog-body">
                                    <h3>微信昵称</h3>
                                    <p><cite >${data.nickName!}</cite></p>
                                </div>
                            </li>
                            <li class="layui-col-xs4">
                                <div class="backlog-body">
                                    <h3>积分</h3>
                                    <p><cite >${data.score!}</cite></p>
                                </div>
                            </li>
                            <li class="layui-col-xs4">
                                <div class="backlog-body">
                                    <h3>账户余额</h3>
                                    <p><cite >${data.webMoney!}</cite></p>
                                </div>
                            </li>
                            <li class="layui-col-xs4">
                                <div class="backlog-body">
                                    <h3>是否掌柜</h3>
                                    <p><cite ><#if data.userType=='2'>是<#else>否</#if></cite></p>
                                </div>
                            </li>
                            <li class="layui-col-xs4">
                                <div class="backlog-body">
                                    <h3>是否合伙人</h3>
                                    <p><cite ><#if data.isSpread==1>是<#else>否</#if></cite></p>
                                </div>
                            </li>
                            <li class="layui-col-xs4">
                                <div class="backlog-body">
                                    <h3>是否VIP</h3>
                                    <p><cite ><#if data.isVip==1>是<#else>否</#if></cite></p>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="layui-col-md12 layui-col-sm12 layui-col-lg12">
                <div class="layui-card">
                    <div class="layui-card-header">财务统计</div>
                    <div class="layui-card-body">
                        <div class="layui-row layui-col-space15">
                            <div class="layui-col-xs3" style="margin-bottom: 10px ">
                                <div class="layui-card">
                                    <div class="layui-card-header">
                                        总计订单                                <span class="layui-badge layuiadmin-badge layui-bg-blue">笔</span>
                                    </div>
                                    <div class="layui-card-body">
                                        <p class="layuiadmin-big-font">${allData.num!}</p>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs3" style="margin-bottom: 10px ">
                                <div class="layui-card">
                                    <div class="layui-card-header">
                                        总消费金额                                <span class="layui-badge layuiadmin-badge layui-bg-blue">元</span>
                                    </div>
                                    <div class="layui-card-body">
                                        <p class="layuiadmin-big-font">${allData.money!}</p>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs3" style="margin-bottom: 10px ">
                                <div class="layui-card">
                                    <div class="layui-card-header">
                                        本月订单                                <span class="layui-badge layuiadmin-badge layui-bg-blue">笔</span>
                                    </div>
                                    <div class="layui-card-body">
                                        <p class="layuiadmin-big-font">${weekData.num!}</p>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-xs3" style="margin-bottom: 10px ">
                                <div class="layui-card">
                                    <div class="layui-card-header">
                                        本月消费金额                                <span class="layui-badge layuiadmin-badge layui-bg-blue">元</span>
                                    </div>
                                    <div class="layui-card-body">
                                        <p class="layuiadmin-big-font">${weekData.money!}</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-12">
                <div class="layui-card">
                    <div class="panel-heading">
                        购买记录
                    </div>
                    <div class="layui-card-body">
                        <div class="layui-btn-container" id="container-action">
                            <button class="layui-btn layui-btn-sm" onclick="download(this)">导出购买记录</button>
                        </div>
                        <table class="layui-hide" id="List" lay-filter="List"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/html" id="info">
    <div>
        <span>
            <img style="width: 30px;height: 30px;margin:0;cursor: pointer;"
                 src="{{d.image}}">
        </span>
        <span>{{d.goodsName}}&nbsp;{{d.goodsAttr}}</span>
        <span> | ￥{{d.webSinglePrice}}×{{d.totalNum}}</span>
    </div>
</script>
<!--订单状态-->
<script type="text/html" id="status">
    {{#  if(d.status == 1){ }}<span>待付款</span>{{# } }}　
    {{#  if(d.status == 2){ }}<span>待发货</span>{{# } }}　
    {{#  if(d.status == 3){ }}<span>待收货</span>{{# } }}　
    {{#  if(d.status == 4){ }}<span>待评价</span>{{# } }}　
    {{#  if(d.status == 5){ }}<span>已完成</span>{{# } }}　
</script>
<script type="text/html" id="orderType">
    {{#  if(d.orderType == 1){ }}<span>普通订单</span>{{# } }}　
    {{#  if(d.orderType == 2){ }}<span>秒杀订单</span>{{# } }}　
    {{#  if(d.orderType == 3){ }}<span>拼团订单</span>{{# } }}　
</script>
<script>
    layList.form.render();
    //加载列表
    layList.tableList('List',"${request.contextPath}/admin/order/listData?openId=${data.openId!}",function (){
        return [
            {type: 'checkbox'},
            {field: 'nickName', title: '用户名', templet: '#userinfo', align: 'center'},
            {field: 'orderType', title: '订单类型', templet: '#orderType', align: 'center'},
            {field: 'info', title: '商品信息', templet: "#info", height: 'full-20'},
            {field: 'status', title: '订单状态', templet: '#status', align: 'center'},
            {field: 'createDate', title: '下单时间', align: 'center'},
        ];
    },4);
     function download(that){
        window.location.href='${request.contextPath}/admin/order/download?openId=${data.openId!}';
    }
</script>
</body>
</html>